package com.musicserver.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.musicserver.common.R;
import com.musicserver.mapper.SongMapper;
import com.musicserver.model.domain.Collect;
import com.musicserver.service.CollectService;
import com.musicserver.mapper.CollectMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author tch001
* @description 针对表【collect】的数据库操作Service实现
* @createDate 2025-09-11 08:34:36
*/
@Service
public class CollectServiceImpl extends ServiceImpl<CollectMapper, Collect>
    implements CollectService{

    @Autowired
    private CollectMapper collectMapper;

    @Autowired
    private SongMapper songMapper;

    @Override
    public R collectionOfUser(Integer userId) {
        return R.success("用户收藏", songMapper.selectCollectSongByUserId(userId));
    }
}




